package util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class CmdParse {
	public static String[] parseCmd(String cmdString) {
//		String re = "";
//		Pattern pattern = Pattern.compile(re);
//		Matcher matcher = pattern.matcher(cmdString);
//		if(matcher.find()){
//			
//		}
		String[] ss = cmdString.split("\\s+");
		if(!(ss[0].equals("SCP")) && !(ss[0].equals("LS")) && !(ss[0].equals("rm"))){
			return null;
		}else{
			return ss;
		}
		
	}
	
	public static String parseFileName(String path){
		String[] ss = path.split(":");
		return ss[1];
	}

}
